cmake_minimum_required(VERSION 2.6)
project(YPL C)
#set(CMAKE_USE_RELATIVE_PATHS ON FORCE)
set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_VERBOSE_MAKEFILE true)
set(CMAKE_C_FLAGS_DEBUG -Wall)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/parser)

IF ( ${CMAKE_SOURCE_DIR} EQUAL ${CMAKE_BINARY_DIR} AND NOT ${ACCEPT_SOURCE_DIR} )
   MESSAGE( FATAL "Please choose a different directory for building" )
ENDIF( ${CMAKE_SOURCE_DIR} EQUAL ${CMAKE_BINARY_DIR} AND NOT ${ACCEPT_SOURCE_DIR} )

add_subdirectory(lemon)
add_subdirectory(hash)
add_subdirectory(parser)
#memory safety
#add_subdirectory(memory_safety)

add_executable(ypl main.c)
target_link_libraries(ypl hash parser)
